package com.example.springbootdemo.transactional;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserDao {

    @Select("select * from user where id= #{id}")
    User findById(Integer id);

    @Update("update user set name = #{name} where id= #{id}")
    int updateNameById(Integer id, String name);
}
